package com.yvtian.inv.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yvtian.inv.pojo.InvProductionAcceptanceItemEntity;
import com.yvtian.inv.dao.InvProductionAcceptanceItemMapper;
import com.yvtian.inv.service.InvProductionAcceptanceItemService;
import com.yvtian.utils.StringHelper;
import org.springframework.stereotype.Service;

/**
 * 验收单用料明细(inv_production_acceptance_item)表服务实现类
 *
 * @author long
 * @since 2024-07-02 13:43:42
 */
@Service("invProductionAcceptanceItemService")
public class InvProductionAcceptanceItemServiceImpl extends ServiceImpl<InvProductionAcceptanceItemMapper, InvProductionAcceptanceItemEntity> implements InvProductionAcceptanceItemService {

    @Override
    public IPage<InvProductionAcceptanceItemEntity> findByPage(Page<InvProductionAcceptanceItemEntity> page, InvProductionAcceptanceItemEntity invProductionAcceptanceItemEntity) {
        LambdaQueryWrapper<InvProductionAcceptanceItemEntity> queryWrapper = new LambdaQueryWrapper<>();
        if (StringHelper.isNotEmpty(invProductionAcceptanceItemEntity.getZcode())) {
            queryWrapper.eq(InvProductionAcceptanceItemEntity::getZcode, invProductionAcceptanceItemEntity.getZcode());
        }
        return this.page(page, queryWrapper);
    }
}

